<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script type="module">
    // import "../js/m1.js";

    // 按需引入
    // import { a } from "../js/m1.js";
    // console.log(a);

    // 模块的整体加载  => 不管该模块暴露了几个方法 => 都可以统一拿过来
    // import * as obj from "../js/m1.js";
    // console.log(obj);
    // console.log(obj.a);
    // console.log(obj.addA);
    // console.log(obj.reduceA);
    // console.log(obj.doubleA);

    // 引入模块的默认值
    // import c from "../js/m1.js";
    // console.log(c);


    // 默认值 + 按需引入
    // import c, { a } from "../js/m1.js";
    // console.log(c, a);

    // import * as all from "../js/m4.js";
    // console.log(all);



    // 关于 重名问题
    // import { a } from "../js/m1.js";
    // import { b } from "../js/m2.js";
    // import { A, B } from "../js/m5.js";

    // console.log(a, b);
    // console.log(A, B);


    import { a } from "../js/m1.js";
    import { b } from "../js/m2.js";

    // 在引入模块式修改变量
    import { a as A, b as B } from "../js/m5.js";

    console.log(a, b);
    console.log(A, B);



</script>

</html>